home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / Install / program files / Borland / BDS / 3.0 / Objrepos / HelpInsight.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2004-10-22  |  4.4 KB  |  237 lines

  1. ∩╗┐<?xml version="1.0" encoding="UTF-8" ?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.  
  4. <xsl:output method="html"/>
  5.  
  6. <xsl:template  match="para">
  7.     <p>
  8.     <xsl:apply-templates/>
  9.     </p>
  10. </xsl:template>
  11.  
  12. <xsl:template match="paramref">
  13.     <xsl:value-of select="@name"/>
  14. </xsl:template>
  15.  
  16. <xsl:template match="summary">
  17.     <p>
  18.     <xsl:apply-templates/>
  19.     </p>
  20. </xsl:template>
  21.  
  22. <xsl:template match="c">
  23.     <tt><xsl:apply-templates/></tt>
  24. </xsl:template>
  25.  
  26. <xsl:template match="code">
  27.     <pre><xsl:apply-templates/></pre>
  28. </xsl:template>
  29.  
  30. <xsl:template match="see">
  31.     <a>
  32.         <xsl:if test="@cref">
  33.             <xsl:attribute name="href">
  34.                 helpinsight:typelink:<xsl:value-of select="@cref" />
  35.             </xsl:attribute>
  36.  
  37.             <xsl:if test="@DisplayName">
  38.                 <xsl:value-of select="@DisplayName" />
  39.             </xsl:if>
  40.  
  41.             <xsl:if test="string(@DisplayName) = ''">
  42.                 <xsl:value-of select="@cref" />
  43.             </xsl:if>
  44.         </xsl:if>
  45.  
  46.         <xsl:if test="@langword">
  47.             <xsl:attribute name="href">
  48.                 langword:<xsl:value-of select="@langword" />
  49.             </xsl:attribute>
  50.  
  51.             <xsl:if test="@DisplayName">
  52.                 <xsl:value-of select="@DisplayName" />
  53.             </xsl:if>
  54.  
  55.             <xsl:if test="string(@DisplayName) = ''">
  56.                 <xsl:value-of select="@langword" />
  57.             </xsl:if>
  58.         </xsl:if>
  59.     </a>
  60. </xsl:template>
  61.  
  62.  
  63. <xsl:template match="exception">
  64.     <DT>
  65.         <I>
  66.     <a>
  67.         <xsl:attribute name="href">
  68.             helpinsight:typelink:<xsl:value-of select="@cref"/>
  69.         </xsl:attribute>
  70.  
  71.         <xsl:if test="@DisplayName">
  72.             <xsl:value-of select="@DisplayName" />
  73.         </xsl:if>
  74.  
  75.         <xsl:if test="string(@DisplayName) = ''">
  76.             <xsl:value-of select="@cref" />
  77.         </xsl:if>
  78.     </a>
  79.         </I>
  80.     </DT>
  81.     <DD>
  82.         <xsl:apply-templates/>
  83.     </DD>
  84. </xsl:template>
  85.  
  86. <xsl:template match="permission">
  87.     <DT>
  88.         <I>
  89.  
  90.     <a>
  91.         <xsl:attribute name="href">
  92.             helpinsight:typelink:<xsl:value-of select="@cref"/>
  93.         </xsl:attribute>
  94.  
  95.         <xsl:if test="@DisplayName">
  96.             <xsl:value-of select="@DisplayName" />
  97.         </xsl:if>
  98.  
  99.         <xsl:if test="string(@DisplayName) = ''">
  100.             <xsl:value-of select="@cref" />
  101.         </xsl:if>
  102.     </a>
  103.  
  104.         </I>
  105.     </DT>
  106.     <DD>
  107.         <xsl:apply-templates/>
  108.     </DD>
  109. </xsl:template>
  110.  
  111. <xsl:template match="param">
  112.     <DT>
  113.         <I><xsl:value-of select="@name"/></I>
  114.     </DT>
  115.     <DD>
  116.         <xsl:apply-templates/>
  117.     </DD>
  118. </xsl:template>
  119.  
  120.  
  121. <xsl:template match="/">
  122.  
  123. <html>
  124.     <head>
  125.  
  126.         <link type='text/css' rel='Stylesheet' href='HelpInsight.css' />
  127.         <title>
  128.             <xsl:value-of select="member/@DisplayName"/>
  129.         </title>
  130.     </head>
  131.  
  132. <body>
  133.  
  134. <div name="main">
  135. <table
  136.     background="HelpInsightGradient.gif"
  137.     border="0"
  138.     width="100%"
  139.     cellpadding="0"
  140.     cellspacing="0">
  141.     <tr>
  142.         <td nowrap="true">
  143.             <div class="maincaption">
  144.                 <xsl:value-of select="member/@DisplayName"/>
  145.                 <xsl:if test="member/source">
  146.                     -
  147.         <a class="codelink">
  148.             <xsl:attribute name="href">helpinsight:filelink:<xsl:value-of select="member/source/@declaredIn"/>?<xsl:value-of select="member/source/@declaredOn"/></xsl:attribute>
  149.             <xsl:value-of select="member/source/@declaredInShort"/> (<xsl:value-of select="member/source/@declaredOn"/>)</a>
  150.                 </xsl:if>
  151.             </div>
  152.         </td>
  153.     </tr>
  154. </table>
  155.  
  156. <xsl:apply-templates select="member/summary"/>
  157.  
  158. <xsl:if test="count(member/param) > 0">
  159.     <H4>Parameters</H4>
  160.     <P>
  161.     <DL>
  162.         <xsl:for-each select="member/param">
  163.             <xsl:apply-templates select="."/>
  164.         </xsl:for-each>
  165.     </DL>
  166.     </P>
  167. </xsl:if>
  168.  
  169. <xsl:if test="count(member/returns) > 0">
  170.     <H4>Returns</H4>
  171.     <P>
  172.     <DL>
  173.         <xsl:apply-templates select="member/returns"/>
  174.     </DL>
  175.     </P>
  176. </xsl:if>
  177.  
  178.  
  179. <xsl:if test="count(member/exception) > 0">
  180.     <H4>Exceptions</H4>
  181.     <P>
  182.     <DL>
  183.         <xsl:for-each select="member/exception">
  184.             <xsl:apply-templates select="."/>
  185.         </xsl:for-each>
  186.     </DL>
  187.     </P>
  188. </xsl:if>
  189.  
  190. <xsl:if test="count(member/permission) > 0">
  191.     <H4>Permission</H4>
  192.     <P>
  193.     <DL>
  194.         <xsl:for-each select="member/permission">
  195.             <xsl:apply-templates select="."/>
  196.         </xsl:for-each>
  197.     </DL>
  198.     </P>
  199. </xsl:if>
  200.  
  201. <xsl:if test="member/remarks">
  202.     <H4>Remarks</H4>
  203.     <P>
  204.     <DL>
  205.         <xsl:for-each select="member/remarks">
  206.             <xsl:apply-templates select="."/>
  207.         </xsl:for-each>
  208.     </DL>
  209.     </P>
  210. </xsl:if>
  211.  
  212. <xsl:if test="member/comments">
  213.     <H4>Comments</H4>
  214.     <P>
  215.     <DL>
  216.         <xsl:for-each select="member/comments">
  217.             <xsl:apply-templates select="."/>
  218.         </xsl:for-each>
  219.     </DL>
  220.     </P>
  221. </xsl:if>
  222.  
  223.  
  224. </div>
  225.  
  226. </body>
  227. </html>
  228.  
  229.  
  230.  
  231.  
  232. </xsl:template>
  233.  
  234. </xsl:stylesheet>
  235.  
  236.  
  237.